/**
 * Copyright(c) ${copyrightYear} ${company}
 * All rights reserved.
 * Created on ${date}
 */
package ${package};

import org.junit.Assert;

/**
 * 验证Struts2SpringContext的类
 * @author ${author}
 */
public class ValidateContext {
	/**
	 * 验证context是否正确
	 * 
	 * @param cloudContext
	 */
	public static void validateContext(Struts2SpringContext<?> context) {
		StringBuffer errorInfo = new StringBuffer("错误信息如下：\n");
		int i = 1;
		for (String error : context.getErrorMsgList()) {
			errorInfo.append((i++) + "：" + error);
		}
		Assert.assertTrue(errorInfo.toString(), context.getSuccess());
	}
}
